import request from '@/utils/request'

// 查询建筑物列表
export function listBuilding(query) {
  return request({
    url: '/system/building/list',
    method: 'get',
    params: query
  })
}

// 查询建筑物详细
export function getBuilding(id) {
  return request({
    url: '/system/building/' + id,
    method: 'get'
  })
}

// 新增建筑物
export function addBuilding(data) {
  return request({
    url: '/system/building',
    method: 'post',
    data: data
  })
}

// 修改建筑物
export function updateBuilding(data) {
  return request({
    url: '/system/building',
    method: 'put',
    data: data
  })
}

// 删除建筑物
export function delBuilding(id) {
  return request({
    url: '/system/building/' + id,
    method: 'delete'
  })
}
// 建筑物类型
export function buildingType() {
  return request({
    url: '/fire/building/type/allList',
    method: 'get'
  })
}
// 筑物使用性质
export function buildingUseWay() {
  return request({
    url: '/fire/way/allList',
    method: 'get'
  })
}
// 筑物火灾危险性
export function buildingFireHazard() {
  return request({
    url: '/fire/hazard/allList',
    method: 'get'
  })
}
// 建筑物耐火等级
export function buildingResistant() {
  return request({
    url: '/fire/resistant/allList',
    method: 'get'
  })
}
// 建筑物结构类型
export function buildingStructure() {
  return request({
    url: '/fire/structure/allList',
    method: 'get'
  })
}
// system/uni/push/{同步
export function buildingPush(id) {
  return request({
    url: '/system/building/push/'+ id,
    method: 'get'
  })
}

